<?php
class DepositAction extends CAction{
	
	public function run(){
		$model = $this->getController()->loadAdModel();
		if(isset($_POST['ajax']) && $_POST['ajax']==='userinfo-form')
		{
			echo CActiveForm::validate($model);
			Yii::app()->end();
		}
		if(isset($_POST['Userinfo']))
		{
			$model->attributes=$_POST['Userinfo'];
			if($model->save()){
				$this->getController()->refresh();
			}
		}
		$this->getController()->render('deposit',array('model'=>$model));
	}
}
?>